// src/components/book/schema.js
const { gql } = require('apollo-server-koa')


//这里，我们为仅有的 book 查询字段添加上我们的自定义指令 @auth
const schema = gql`

  enum BookStatus {
    DELETED
    NORMAL
  }

  type Book {
    id: ID
    name: String
    price: Float
    status: BookStatus
    created: Date
  }

  extend type Query {
    book: Book @auth
  }
`

module.exports = { schema }